package com.lims.landInfo.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javacommon.base.*;

import cn.org.rapid_framework.page.*;

import com.lims.landInfo.model.*;
import com.lims.landInfo.dao.*;
import com.lims.landInfo.vo.query.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Service
@Transactional  @SuppressWarnings("unchecked")
public class LandFileManager extends BaseManager<LandFile,java.lang.String>{

	private LandFileDao landFileDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setLandFileDao(LandFileDao dao) {
		this.landFileDao = dao;
	}
	public EntityDao getEntityDao() {
		return this.landFileDao;
	}
	
	@Transactional(readOnly=true)
	public Page findPage(LandFileQuery query) {
		return landFileDao.findPage(query);
	}
	
	@Transactional(readOnly=true)
	public ListRange findRange(LandFileQuery query) {
		Page page = this.landFileDao.findPage(query);
		ListRange listRange = new ListRange();
		listRange.setRows(page.getResult().toArray());
		listRange.setTotal(page.getTotalCount());
		return listRange;
	}
	
}
